﻿using TaskMasterByQuartz.Domain.Entities;
using TaskMasterByQuartz.Domain.InterfaceRepository;
using TaskMasterByQuartz.Infrastructure.DbContext;

namespace TaskMasterByQuartz.Infrastructure.Implementations
{
    public class CustomJobLog : ICustomJobLog
    {
        private readonly MyDbContext dbContext;

        public CustomJobLog(MyDbContext dbContext)
        {
            this.dbContext = dbContext;
        }

        public async Task AddLog(ExecuteLog executeLog)
        {
            await dbContext.AddAsync(executeLog);
            await dbContext.SaveChangesAsync();
        }
    }
}
